import axios from './axios'

export const getOutingPage = (params) => axios.get('/admin/outing/page', { params })
export const addOuting = (data) => axios.post('/admin/outing/apply', data)

export const returnOuting = (data) => axios.put('/admin/outing/return', data)
// 缺失接口补充
export const checkInOuting = (data) => axios.post('/admin/outing/checkIn', data)
export const getCaregiverOutingRecords = (params) => axios.get('/admin/outing/caregiver', { params })
export const approveOutingApply = (data) => axios.post('/admin/outing/approve', data)
export const rejectOutingApply = (data) => axios.post('/admin/outing/reject', data)
export const getOutingApplies = (params) => axios.get('/admin/outing/applies', { params })
export const processOutingApply = (data) => axios.post('/admin/outing/process', data)
export const getOutingRecords = (params) => axios.get('/admin/outing/page', { params })
export const registerOutingRecord = (data) => axios.post('/admin/outing/register', data)
export const returnOutingRecord = (data) => axios.post('/admin/outing/return', data)
export const extendOutingRecord = (data) => axios.post('/admin/outing/extend', data)
export const getFamilyOutingReturns = (params) => axios.get('/admin/outing/family-returns', { params })
export const addFamilyOutingReturn = (data) => axios.post('/admin/outing/family-return', data)
// 家属端外出相关接口
export const getFamilyOutingRecords = (params) =>
    axios.get('/admin/outing/family/records', { params })

export const applyOuting = (data) =>
    axios.post('/admin/outing/family/apply', data)

export const cancelOutingApply = (applyId) =>
    axios.put(`/admin/outing/family/cancel/${applyId}`)

export const submitOutingReturn = (data) =>
    axios.post('/admin/outing/family/return', data)